import time

from _spice_path import spice_path

def _twobuttontimed(spiceref,string_to_print,timeout,timeoutreturn,truebutton,falsebutton,title):
    seconds=timeout*1000
    popup=spiceref.GetVIReference(spice_path + '\\common\\Utilities\\GUI_utilities\\TwoButtonTimed.vi')
    parname1='message'
    parname2='T button name'
    parname3='F button name'
    parname4='Window Title (Warning)'
    parname5='Timeout Return'
    parname6='First or second Monitor'
    parname7='True/False Output'
    parname8='Timeout'
    parnames=parname1,parname2,parname3,parname4,parname5,parname6,parname7,parname8
    parvalues=string_to_print,truebutton,falsebutton,title,timeoutreturn,0,0,seconds
    parnames,parvalues = popup.Call(parnames,parvalues)
    return parvalues[6]    
    
